<?php

class MainAddView extends HTMLQuickFormView {
	
	protected function CreateForm() {
		$this->form->addElement('text', 'firstName', 'First Name:');
		$this->form->addElement('text', 'lastName', 'Last Name:');
		$this->form->addElement('select', 'gender', 'Gender:', array('M' => 'male', 'F' => 'female', 'O' => 'other'));
		$this->form->addElement('date', 'birthDate', 'Birth Date:');
		$this->form->addElement('date', 'deathDate', 'Death Date:');
		$this->form->addElement('button', 'addButton', 'Add Person', array('id' => 'addButton'));
				
		$this->form->addRule('firstName', 'First name is required.', 'required');
		$this->form->addRule('lastName', 'Last name is required.', 'required');
		$this->form->addRule('birthDate', 'Birth date is required.', 'required');
	}
}

?>